Platform Explorer / Nuxeo Platform 2023.10

Component org.nuxeo.ecm.core.scheduler.SchedulerService

Documentation

Core scheduler registry service.

Requirements

Aliases

  • org.nuxeo.ecm.platform.scheduler.core.service.SchedulerRegistryService

Resolution Order

794
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Implementation

Class: org.nuxeo.ecm.core.scheduler.SchedulerServiceImpl

Services

Extension Points

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.core.scheduler.SchedulerService">
  <alias>org.nuxeo.ecm.platform.scheduler.core.service.SchedulerRegistryService</alias>

  <require>org.nuxeo.runtime.cluster.ClusterService</require>

  <documentation>
     Core scheduler registry service.
  </documentation>

  <service>
    <provide interface="org.nuxeo.ecm.core.scheduler.SchedulerService" />
  </service>

  <implementation class="org.nuxeo.ecm.core.scheduler.SchedulerServiceImpl" />

  <extension-point name="schedule">

    <documentation>
      Extension allowing the registration of schedules.
      This is similar to a cron job sending events. Note that
      contrary to UNIX cron there is an additional "seconds" field
      in the cron expression.
      <p/>
      A scheduler definition contains information about what event is sent,
      when, and under what identity.
      <p/>
      For instance :
      <code>
        <schedule id="mySchedule" jobFactoryClass="org.nuxeo.ecm.core.scheduler.DefaultEventJobFactory">
          <username>Administrator</username>
          <event>myEvent</event>
          <eventCategory>default</eventCategory>
          <!-- Every first of the month at 3am -->
          <cronExpression>0 0 3 1 * ?</cronExpression>
          <timezone>UTC</timezone>
        </schedule>
      </code>
      jobFactoryClass is optional and defaults to org.nuxeo.ecm.core.scheduler.DefaultEventJobFactory.
      timezone is optional and defaults to system default.

      @see org.quartz.CronTrigger
      @see org.nuxeo.ecm.core.scheduler.EventJobFactory
      @see http://www.quartz-scheduler.org/docs/api/1.8.1/org/quartz/CronExpression.html
      @see http://www.quartz-scheduler.org/docs/tutorials/crontrigger.html
    </documentation>

    <object class="org.nuxeo.ecm.core.scheduler.ScheduleImpl"/>

  </extension-point>

  <extension target="org.nuxeo.runtime.ConfigurationService" point="configuration">
    <documentation>
      Delay Quartz scheduler start to avoid unique key constraint violation with qrtz_LOCKS table
      <p />
      Default behavior is to delay for 5 seconds.

      @since 2021.19
    </documentation>
    <property name="org.nuxeo.scheduler.start.delay">5s</property>
  </extension>

</component>